<?php

function isLoggedIn()

	{
    if(isset($_SESSION['valid']) && $_SESSION['webmasterid'])
    return true;
    return false;
	}	

//if the user has not logged in
if(!isLoggedIn())
	
	{
    header('Location: No Account');
    die();
	}

//Checks the webmasters permissions

if($_SESSION['webmaster_permission'] < $page_permission)
	
	{
	header('Location: No permission');
	}

?>